<template>
  <div id="#cityCascader">
    <el-cascader v-model="selectedCity" :options="dataProvider.cities" :show-all-levels="true" :props="props.cityProps">
    </el-cascader>
  </div>
</template>

<script>
  import r from '../../utils/RequestUtil'
  export default {
    name: "cityCascader",
    data: function () {
      return {

        dataProvider: {
          cities: []
        },
        props: {
          cityProps: {
            value: "provinceName",
            label: "provinceName",
            children: "children"
          }
        }
      }
    },
    computed: {
      selectedCity: function () {
        let arr = [];
        arr.push(this.province);
        arr.push(this.city);
        arr.push(this.county);
        r.trace(arr)
        return arr;
      }
    },
    props: {
      province: {
        type: String,
      },
      city: {
        type: String,
      },
      county: {
        type: String
      }
    },
    created: function () {}
  }

</script>

<style scoped="scoped">
  .el-cascader {
    width: 100%;
  }

</style>
